		<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
		
		<c:url value="/resources/js" var="jsPath"/>
		
		
		
		<script src="${jsPath}/bootstrap.min.js"></script>
		<script src="${jsPath}/chart.min.js"></script>
		<script src="${jsPath}/chart-data.js"></script>
		<script src="${jsPath}/easypiechart.js"></script>
		<script src="${jsPath}/easypiechart-data.js"></script>
		<script>
		
			if ($("#temErroForm").val() == 'sim') {
				$(".required").each(function() {
					if ($(this).val() == "") {
						$(this).addClass("erroValidacao");
					}
				});
			}
			
			$(".required").each(function(){
				$("label[for='"+$(this).attr("name")+"']").before("<span class='obrigatorio'>*</span>");
			});
			
			$(".datepicker").datepicker({
				 dateFormat: 'dd/mm/yy'
			});
		
			$(".datepicker").mask("99/99/9999")
			
			
			$('#codigoDaPecaAutocomplete').autocomplete(
				{
					serviceUrl : '${pageContext.request.contextPath}/seguro/getPecas',
					paramName : "nome",
					delimiter : ",",
					transformResult : function(response) {
						return {
							suggestions : $.map($.parseJSON(response), function(item) {
								return {
											value : item.codigo + " - " + item.descricao,
											data : item.descricao
										};
								})
						};
					}
				});

		
		</script>	
	</body>
</html>